package com.androidx.p013lv.mine.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.androidx.p013lv.base.recycler.BaseRecyclerAdapter;
import com.androidx.p013lv.base.recycler.BaseRecyclerHolder;
import com.androidx.p013lv.mine.C1207R;
import com.androidx.p013lv.mine.bean.VipCenterBean;

/* renamed from: com.androidx.lv.mine.adapter.VipCenterGoldAdapter */
public class VipCenterGoldAdapter extends BaseRecyclerAdapter<VipCenterBean.GoldVipListBean, Holder> {
    public void MyHolder(Holder holder, int i) {
        holder.setData((VipCenterBean.GoldVipListBean) getDataInPosition(i));
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new Holder(LayoutInflater.from(viewGroup.getContext()).inflate(C1207R.C1212layout.item_vip_center_gold, viewGroup, false));
    }

    /* access modifiers changed from: package-private */
    /* renamed from: com.androidx.lv.mine.adapter.VipCenterGoldAdapter$Holder */
    public static class Holder extends BaseRecyclerHolder {
        private TextView item_gold_num;
        private TextView item_gold_perice;
        private RelativeLayout item_gold_view;
        private ImageView item_selected_img;

        Holder(View view) {
            super(view);
            this.item_gold_view = (RelativeLayout) view.findViewById(C1207R.C1210id.item_gold_view);
            this.item_gold_num = (TextView) view.findViewById(C1207R.C1210id.item_gold_num);
            this.item_gold_perice = (TextView) view.findViewById(C1207R.C1210id.item_gold_perice);
            this.item_selected_img = (ImageView) view.findViewById(C1207R.C1210id.item_selected_img);
        }

        /* access modifiers changed from: package-private */
        public void setData(VipCenterBean.GoldVipListBean goldVipListBean) {
            TextView textView = this.item_gold_num;
            textView.setText(goldVipListBean.getGoldNum() + "金幣");
            TextView textView2 = this.item_gold_perice;
            textView2.setText("" + goldVipListBean.getPrice());
            if (goldVipListBean.isSelected()) {
                this.item_selected_img.setVisibility(0);
                this.item_gold_view.setBackgroundResource(C1207R.C1209drawable.mine_vip_center_item_selected);
                return;
            }
            this.item_selected_img.setVisibility(8);
            this.item_gold_view.setBackgroundResource(C1207R.C1209drawable.mine_vip_center_item_un_selected);
        }
    }
}
